package com.lq.ecoldchain.ui.main.my


import android.view.View
import com.alibaba.android.arouter.launcher.ARouter
import com.lq.ecoldchain.base.BaseNavigator
import com.lq.ecoldchain.base.CommonLoadingViewModel
import com.lq.ecoldchain.base.viewdelegate.BaseLoadingViewDelegate

/*
*2018/12/25 0025  14:20
*function by lq
*/
class MineDelegate(val viewModel:MineViewModel, loadingViewModel: CommonLoadingViewModel):BaseLoadingViewDelegate(loadingViewModel){

    fun toWithDraw(view:View){
        ARouter.getInstance().build(BaseNavigator.withdraw).withString("money",viewModel.money.value!!).navigation()
    }

    fun toUserInfo() =ARouter.getInstance().build(BaseNavigator.userActivity).withParcelable("data",viewModel.user.value!!).navigation()

    fun signOut() = viewModel.signOut()
}